package com.feng.zhihao.apigeteway.entity;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * ChannelProject entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "CHANNEL_PROJECT")

public class ChannelProject implements java.io.Serializable {

	// Fields

	private ChannelProjectId id;
	private ChannelInfo channelInfo;
	private ProjectInfo projectInfo;
	private String reqSignPublicKey;
	private String reqSignPrivateKey;
	private String reqSignKey;
	private String reqSignIv;
	private String resSignPublicKey;
	private String resSignPrivateKey;
	private String resSignKey;
	private String resSignIv;
	private String reqEncryptionKey;
	private String reqEncryptionIv;
	private String reqEncryptionPublicKey;
	private String reqEncryptionPrivateKey;
	private String resEncryptionKey;
	private String resEncryptionIv;
	private String resEncryptionPublicKey;
	private String resEncryptionPrivateKey;

	// Constructors

	/** default constructor */
	public ChannelProject() {
	}

	/** minimal constructor */
	public ChannelProject(ChannelProjectId id, ChannelInfo channelInfo, ProjectInfo projectInfo) {
		this.id = id;
		this.channelInfo = channelInfo;
		this.projectInfo = projectInfo;
	}

	/** full constructor */
	public ChannelProject(ChannelProjectId id, ChannelInfo channelInfo, ProjectInfo projectInfo,
			String reqSignPublicKey, String reqSignPrivateKey, String reqSignKey, String reqSignIv,
			String resSignPublicKey, String resSignPrivateKey, String resSignKey, String resSignIv,
			String reqEncryptionKey, String reqEncryptionIv, String reqEncryptionPublicKey,
			String reqEncryptionPrivateKey, String resEncryptionKey, String resEncryptionIv,
			String resEncryptionPublicKey, String resEncryptionPrivateKey) {
		this.id = id;
		this.channelInfo = channelInfo;
		this.projectInfo = projectInfo;
		this.reqSignPublicKey = reqSignPublicKey;
		this.reqSignPrivateKey = reqSignPrivateKey;
		this.reqSignKey = reqSignKey;
		this.reqSignIv = reqSignIv;
		this.resSignPublicKey = resSignPublicKey;
		this.resSignPrivateKey = resSignPrivateKey;
		this.resSignKey = resSignKey;
		this.resSignIv = resSignIv;
		this.reqEncryptionKey = reqEncryptionKey;
		this.reqEncryptionIv = reqEncryptionIv;
		this.reqEncryptionPublicKey = reqEncryptionPublicKey;
		this.reqEncryptionPrivateKey = reqEncryptionPrivateKey;
		this.resEncryptionKey = resEncryptionKey;
		this.resEncryptionIv = resEncryptionIv;
		this.resEncryptionPublicKey = resEncryptionPublicKey;
		this.resEncryptionPrivateKey = resEncryptionPrivateKey;
	}

	// Property accessors
	@EmbeddedId

	@AttributeOverrides({
			@AttributeOverride(name = "channelId", column = @Column(name = "CHANNEL_ID", nullable = false, length = 36)),
			@AttributeOverride(name = "projectId", column = @Column(name = "PROJECT_ID", nullable = false, length = 36)) })

	public ChannelProjectId getId() {
		return this.id;
	}

	public void setId(ChannelProjectId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "CHANNEL_ID", nullable = false, insertable = false, updatable = false)

	public ChannelInfo getChannelInfo() {
		return this.channelInfo;
	}

	public void setChannelInfo(ChannelInfo channelInfo) {
		this.channelInfo = channelInfo;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "PROJECT_ID", nullable = false, insertable = false, updatable = false)

	public ProjectInfo getProjectInfo() {
		return this.projectInfo;
	}

	public void setProjectInfo(ProjectInfo projectInfo) {
		this.projectInfo = projectInfo;
	}

	@Column(name = "REQ_SIGN_PUBLIC_KEY", length = 65535)

	public String getReqSignPublicKey() {
		return this.reqSignPublicKey;
	}

	public void setReqSignPublicKey(String reqSignPublicKey) {
		this.reqSignPublicKey = reqSignPublicKey;
	}

	@Column(name = "REQ_SIGN_PRIVATE_KEY", length = 65535)

	public String getReqSignPrivateKey() {
		return this.reqSignPrivateKey;
	}

	public void setReqSignPrivateKey(String reqSignPrivateKey) {
		this.reqSignPrivateKey = reqSignPrivateKey;
	}

	@Column(name = "REQ_SIGN_KEY", length = 65535)

	public String getReqSignKey() {
		return this.reqSignKey;
	}

	public void setReqSignKey(String reqSignKey) {
		this.reqSignKey = reqSignKey;
	}

	@Column(name = "REQ_SIGN_IV", length = 65535)

	public String getReqSignIv() {
		return this.reqSignIv;
	}

	public void setReqSignIv(String reqSignIv) {
		this.reqSignIv = reqSignIv;
	}

	@Column(name = "RES_SIGN_PUBLIC_KEY", length = 65535)

	public String getResSignPublicKey() {
		return this.resSignPublicKey;
	}

	public void setResSignPublicKey(String resSignPublicKey) {
		this.resSignPublicKey = resSignPublicKey;
	}

	@Column(name = "RES_SIGN_PRIVATE_KEY", length = 65535)

	public String getResSignPrivateKey() {
		return this.resSignPrivateKey;
	}

	public void setResSignPrivateKey(String resSignPrivateKey) {
		this.resSignPrivateKey = resSignPrivateKey;
	}

	@Column(name = "RES_SIGN_KEY", length = 65535)

	public String getResSignKey() {
		return this.resSignKey;
	}

	public void setResSignKey(String resSignKey) {
		this.resSignKey = resSignKey;
	}

	@Column(name = "RES_SIGN_IV", length = 65535)

	public String getResSignIv() {
		return this.resSignIv;
	}

	public void setResSignIv(String resSignIv) {
		this.resSignIv = resSignIv;
	}

	@Column(name = "REQ_ENCRYPTION_KEY", length = 65535)

	public String getReqEncryptionKey() {
		return this.reqEncryptionKey;
	}

	public void setReqEncryptionKey(String reqEncryptionKey) {
		this.reqEncryptionKey = reqEncryptionKey;
	}

	@Column(name = "REQ_ENCRYPTION_IV", length = 65535)

	public String getReqEncryptionIv() {
		return this.reqEncryptionIv;
	}

	public void setReqEncryptionIv(String reqEncryptionIv) {
		this.reqEncryptionIv = reqEncryptionIv;
	}

	@Column(name = "REQ_ENCRYPTION_PUBLIC_KEY", length = 65535)

	public String getReqEncryptionPublicKey() {
		return this.reqEncryptionPublicKey;
	}

	public void setReqEncryptionPublicKey(String reqEncryptionPublicKey) {
		this.reqEncryptionPublicKey = reqEncryptionPublicKey;
	}

	@Column(name = "REQ_ENCRYPTION_PRIVATE_KEY", length = 65535)

	public String getReqEncryptionPrivateKey() {
		return this.reqEncryptionPrivateKey;
	}

	public void setReqEncryptionPrivateKey(String reqEncryptionPrivateKey) {
		this.reqEncryptionPrivateKey = reqEncryptionPrivateKey;
	}

	@Column(name = "RES_ENCRYPTION_KEY", length = 65535)

	public String getResEncryptionKey() {
		return this.resEncryptionKey;
	}

	public void setResEncryptionKey(String resEncryptionKey) {
		this.resEncryptionKey = resEncryptionKey;
	}

	@Column(name = "RES_ENCRYPTION_IV", length = 65535)

	public String getResEncryptionIv() {
		return this.resEncryptionIv;
	}

	public void setResEncryptionIv(String resEncryptionIv) {
		this.resEncryptionIv = resEncryptionIv;
	}

	@Column(name = "RES_ENCRYPTION_PUBLIC_KEY", length = 65535)

	public String getResEncryptionPublicKey() {
		return this.resEncryptionPublicKey;
	}

	public void setResEncryptionPublicKey(String resEncryptionPublicKey) {
		this.resEncryptionPublicKey = resEncryptionPublicKey;
	}

	@Column(name = "RES_ENCRYPTION_PRIVATE_KEY", length = 65535)

	public String getResEncryptionPrivateKey() {
		return this.resEncryptionPrivateKey;
	}

	public void setResEncryptionPrivateKey(String resEncryptionPrivateKey) {
		this.resEncryptionPrivateKey = resEncryptionPrivateKey;
	}

}